/*River Warren
 *October 7, 2011
 *
 *Updated Oct 16 2011 8:46PM - River Warren, made changes to reflect updates in base class
 *Updated Oct 16 2011 9:08PM - River Warren, added inventory get methods
 *Updated Nov 5, 2011 - River Warren
 *Updated Nov 16, 2011 - Devin Manno
 *
 *Room.h
 *Room object to be used by the game Dungeons and Princesses
 *Room has a door object as well various other possible objects
 *including but not limited to: Keys, treasure, monsters, weapons, other equipment and princesses.
 *room has a description which includes
 descriptions of the view in four directions
 description of any doors
 description of any objects in the room
 *Room allows movement from one room to another in accordence with house plot in docs.
 *Room for new game is R0
 */

#ifndef ROOM_H_INCLUDED
#define ROOM_H_INCLUDED

#include "Door.h"
#include "Direction.h"
#include "RoomInventory.h"
#include <fstream>
#include <ostream>
#include <istream>
#include <iostream>
#include <string.h>
#include <stdlib.h>

#define DELIMS ",\n"
#define MAX 250

#include "Base.h"

using std::string;
using std::ofstream;
using std::endl;
using std::ifstream;

class Room: public Base, public RoomInventory
{

private:
    string linkID;//a unique linkID value
    string objectID; // override base class object ID to be a string in room class
    string descArray[5];//and array to hold the descriptions
    //string description;//general description of room  // this is not needed we are inhearting from base!
    string N_desc;//description of what is to the north
    string E_desc;//description of what is to the east
    string S_desc;//description of what is to the south
    string W_desc;//description of what is to the west
    bool visited; // true if the player has already been to the room, false otherwise

    Direction directions[4]; // contains the 4 direction objects of this room

    void setLinkID(string linkIDToSet);
    void setObjectID(string objectIDToSet);
public:
    Room();
    ~Room();


    string getLinkID(){return linkID;}
    void loadRoom(string);//loads new room
    void saveRoom(string);//writes new room state to file

    bool addDirection(Direction newDirectionObject);
    Direction * getDirections();
    bool getHasAgroMonster();
    Direction * getDirection(std::string directionToGet);
    const bool getVisited();
    void setVisited();

    const string getObjectID();
    // Add functions to make class searchable

    friend bool operator< (const Room &obj1, const Room &obj2);
    friend bool operator== (const Room &obj1, const string &objectID);
    friend bool operator== (const Room &obj1, const Room &obj2);

protected:



};

#endif // ROOM_H_INCLUDED
